<template>
	<view class="container" v-if="isInsterset">
		<image
			class="img"
			src="https://yanxue-1300739304.cos.ap-shanghai.myqcloud.com/images/1733035911372%E5%9B%BE%E5%B1%82%206%20%E6%8B%B7%E8%B4%9D@2x.png"
		/>
		<view class="contentbox">
			<view class="title">研学感兴趣度调研</view>
			<view class="title2">参加调研让我们变得更好</view>
			<view class="card" id="capture">
				<image class="headPic" :src="userInfo.headPic" mode="aspectFill" />
				<view class="tipstext">Hello，您是否对本次研学感兴趣呢</view>
				<view class="goodsname">【{{ detail.goodsName }}】</view>
				<view class="imgbox">
					<image class="imgbox2" :src="detail.coverImage" mode="aspectFill" />
				</view>
				<view class="imgbottom"></view>
			</view>
			<view class="btnbox">
				<view class="no" @click="surveyGoodsFunc(1)">不感兴趣</view>
				<view class="yes" @click="surveyGoodsFunc(0)">感兴趣</view>
			</view>
		</view>
	</view>
</template>
<script>
import indexApi from '@/api/yanxue/indexPage'
export default {
	porps: {
		// id: {
		//   type: String,
		//   default: "",
		// },
		// img: {
		//   type: String,
		//   default: "",
		// },
		// goodsName: {
		//   type: String,
		//   default: "",
		// },
	},
	data() {
		return {
			userInfo: this.$store.state.user.userInfo,
			isInsterset: false,
			detail: {},
			id: ''
		}
	},
	methods: {
		surveyGoodsFunc(type) {
			console.log(this.id)
			indexApi
				.surveyGoods({ id: this.id, type })
				.then(res => {
					this.isInsterset = false
				})
				.catch(() => {
					this.isInsterset = false
				})
		}
	}
}
</script>
<style lang="scss" scoped>
.container {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9999;
	overflow: hidden;
	//   background-image: url("https://yanxue-1300739304.cos.ap-shanghai.myqcloud.com/images/1733035911372%E5%9B%BE%E5%B1%82%206%20%E6%8B%B7%E8%B4%9D@2x.png");
	background: #17191a;
	background-repeat: no-repeat;
	.img {
		width: 100%;
		height: 100vh;
	}
	.contentbox {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		.title {
			height: 58rpx;
			text-align: center;
			font-family: HarmonyOS Sans SC;
			font-weight: 500;
			font-size: 60rpx;
			color: #a2ff00;
			margin: 50rpx auto 34rpx auto;
		}
		.title2 {
			text-align: center;
			height: 28rpx;
			font-family: HarmonyOS Sans SC;
			font-weight: 500;
			font-size: 28rpx;
			color: #ffffff;
		}
		.card {
			width: 702rpx;
			height: 870rpx;
			background: #ffffff;
			border-radius: 20rpx;
			margin: 100rpx auto 0 auto;
			position: relative;
			.headPic {
				position: absolute;
				top: -56rpx;
				left: 254rpx;
				width: 192rpx;
				height: 192rpx;
				border-radius: 50%;
				border: 4rpx solid #000;
			}
			.tipstext {
				text-align: center;
				height: 42rpx;
				font-family: HarmonyOS Sans SC;
				font-weight: 500;
				font-size: 40rpx;
				color: #000000;
				padding: 196rpx 0 102rpx;
			}
			.goodsname {
				text-align: center;
				width: 320rpx;
				margin: 0 auto;
				display: -webkit-box;
				-webkit-box-orient: vertical; /* 设置或继承对象的子元素排列方式 */
				-webkit-line-clamp: 1; /* 设置显示的行数 */
				overflow: hidden;
				height: 54rpx;
				font-family: HarmonyOS Sans SC;
				font-weight: bold;
				font-size: 44rpx;
				color: #000000;
			}
			.imgbox {
				background-image: url('https://yanxue-1300739304.cos.ap-shanghai.myqcloud.com/images/1733037503622111.png');
				background-repeat: no-repeat;
				background-size: 100% 100%;
				width: 658rpx;
				height: 424rpx;
				margin: 0 auto;
				.imgbox2 {
					width: 576rpx;
					height: 340rpx;
					margin: 38rpx;
					border-radius: 20rpx;
				}
			}
			.imgbottom {
				background-image: url('https://yanxue-1300739304.cos.ap-shanghai.myqcloud.com/images/1733037683053222222.png');
				background-size: 100% 100%;
				background-repeat: no-repeat;
				width: 114rpx;
				height: 69rpx;
				margin: 20rpx auto;
			}
		}
		.btnbox {
			margin-top: 46rpx;
			width: 100%;
			display: flex;
			align-items: center;
			justify-content: center;
			.no {
				width: 226rpx;
				height: 94rpx;
				text-align: center;
				line-height: 94rpx;
				background: #e9e9f0;
				border-radius: 46rpx;
				font-family: HarmonyOS Sans SC;
				font-weight: 500;
				font-size: 28rpx;
				color: #000000;
			}
			.yes {
				width: 395rpx;
				height: 94rpx;
				background: #a2ff00;
				border-radius: 46rpx;
				text-align: center;
				line-height: 94rpx;
				margin-left: 26rpx;
				font-family: HarmonyOS Sans SC;
				font-weight: 500;
				font-size: 28rpx;
				color: #000000;
			}
		}
	}
}
</style>
